-- GENERATED SPELL FOR [Deathforge Guardian] --


function spell0_20878(pUnit, Event) --@Piercing Strike,n/a--
pUnit:FullCastSpellOnTarget(37998,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20878', 4330, 1)
end

function spell1_20878(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20878', 8255, 1)
end

function Sorts_20878(pUnit, Event)
local choix_sorts_20878 = math.random(0, 1)
if choix_sorts_20878 == 0 then
pUnit:RegisterEvent('spell0_20878', 1, 1)
end
if choix_sorts_20878 == 1 then
pUnit:RegisterEvent('spell1_20878', 1, 1)
end
end

function mob20878_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20878', math.random(1500, 3000), 1)
end

function mob20878_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20878_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20878_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20878, 1, 'mob20878_Action')
RegisterUnitEvent(20878, 2, 'mob20878_Leave')
RegisterUnitEvent(20878, 3, 'mob20878_Kill')
RegisterUnitEvent(20878, 4, 'mob20878_Die')
